<?php
require_once dirname(__DIR__)."/login_filter.php";
use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\cls\tom\Tools;
use app\model\Users;
$uuid=$Auth['uuid'];
//分页
$page = isset($_REQUEST["page"]) ? intval($_REQUEST["page"]) : 1;
$page = $page > 0 ? $page : 1;
$pageSize = 50;
$da3=[];
//实例化数据库
$db = SysResource::getDB(false);
$Users = new Users($db);
$da1=$Users->my_material($page,$pageSize,$uuid);
if(empty($da1)){
    Response::output(0,"查询成功",$da3);
}else{
    foreach($da1 as $k=>&$v){
        $v['count_material_love_10']=round($v['count_material_love']*1.7);
        $v['count_material_share_10']=round($v['count_material_share']*1.7);
        if(empty($v['share_pic'])){
            $v['share_pic']="";
        }
        if(empty($v['video_desc'])){
            $v['video_desc']="";
        }
    }
    Response::output(0,"查询成功",$da1);
}
